package com.openspring.platform.model;

import java.util.Date;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import com.openspring.framework.extend.jackson.CustomDateSerializer;
import com.openspring.framework.annotation.persistence.GeneratedValue;
import com.openspring.framework.annotation.persistence.Id;
import com.openspring.framework.annotation.persistence.Table;

@Table(name="t_login_log")
public class LoginLog {

	private Long id;
	private Long userId;
	private String userName;
	private Date loginDate;
	private String ip;
	private int type;
	
	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	@JsonSerialize(using = CustomDateSerializer.class)
	public Date getLoginDate() {
		return loginDate;
	}
	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
}
